package com.foreknow.oop;

/**
 * 构造器的重载(overload)
 */
public class OverloadDemo {
    public OverloadDemo(){
        System.out.println("111111111");
    }

    public OverloadDemo(String s,double d){
        System.out.println(s);
    }
    //方法重载
    public int add(int a,int b){
        return a+b;
    }
    public int add(int a,int b,int c){
        return a+b+c;
    }

    public static void main(String[] args){
        OverloadDemo overloadDemo = new OverloadDemo("abc",3.14);
    }
}
